home *** CD-ROM | disk | FTP | other *** search
/ The Complete Utilities To…ka 501 Killer Utilities! / 501 Killer Utilities! (Macworld July 1995).cdr / Programming / ICProgKit1.0 / APIs / ICTypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  2.1 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*
  2.     The canonical Internet Config interface is defined in Pascal.  These headers have
  3.     not been thoroughly tested.  If there is a conflict between these headers and the
  4.     Pascal interfaces, the Pascal should take precedence.
  5. */
  6.  
  7. /* ///////////////////////////////////////////////////////////////////////////////// */
  8.  
  9. #ifndef __ICTYPES__
  10. #define __ICTYPES__
  11.  
  12. #ifndef __TYPES__
  13. #include <Types.h>
  14. #endif
  15.  
  16. /* ///////////////////////////////////////////////////////////////////////////////// */
  17.  
  18. #if defined(powerc) || defined (__powerc)
  19. #pragma options align=mac68k
  20. #endif
  21.  
  22. enum {
  23.     icPrefNotFoundErr = -666,        /* preference not found (duh!) */
  24.     icPermErr = -667,                        /* cannot set preference */
  25.     icPrefDataErr = -668,                /* problem with preference data */
  26.     icInternalErr = -669,                /* hmm, this is not good */
  27.     icTruncatedErr = -670,            /* more data was present than was returned */
  28.     icNoMoreWritersErr = -671        /* you cannot begin a write session because someone else is already doing it */
  29. };
  30.  
  31. enum {
  32.     ICattr_no_change = 0xFFFFFFFFL,                /* supply this to ICSetPref to tell it not to change the attributes */
  33.     ICattr_locked_bit = 0,                                /* bits in the preference attributes */
  34.     ICattr_locked_mask = 0x00000001L            /* masks for the above */
  35. };
  36.  
  37. #define ICfiletype 'ICAp'
  38. #define ICcreator 'ICAp'
  39.  
  40. #define ICdefault_file_name "\pInternet Preferences"    /* default file name, for internal use, overridden by a component resource */
  41.  
  42. enum {
  43.     ICdefault_file_name_ID = 1024                    /* ID of resource in component file */
  44. };
  45.  
  46. struct ICDirSpec {                                            /* a record that specifies a folder */
  47.     short vRefNum;
  48.     long dirID;
  49. };
  50. typedef struct ICDirSpec ICDirSpec;
  51.  
  52. typedef ICDirSpec ICDirSpecArray[4];        /* an array of the above */
  53. typedef ICDirSpecArray *ICDirSpecArrayPtr;    /* a pointer to that array */
  54.  
  55. typedef long ICAttr;                                        /* type for preference attributes */
  56. typedef long ICError;                                        /* type for error codes */
  57. typedef Ptr ICInstance;                                    /* opaque type for preference reference */
  58. enum {
  59.     icNoPerm = 0,
  60.     icReadOnlyPerm = 1,
  61.     icReadWritePerm = 2
  62. };
  63. typedef unsigned char ICPerm;
  64.  
  65. #if defined(powerc) || defined(__powerc)
  66. #pragma options align=reset
  67. #endif
  68.  
  69. #endif
  70.